import 'package:auntserver/screens/login_regsiter_screen.dart';
import 'package:auntserver/screens/main_screen.dart';
import 'package:auntserver/screens/orderdetail_screen.dart';
import 'package:auntserver/screens/precious_screen.dart';
import 'package:auntserver/screens/splash_screen.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/cupertino.dart';


//空页面
var emptyHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<String>> params) {
      print('ERROR====>ROUTE WAS NOT FONUND!!!'); // 找不到路由，跳转404页面
      print('找不到路由，404');
      return Center(child:Text("找不到路由"));
});

var preciousHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    final args = context.settings.arguments as String;
    return PreciousScreen(args);
  },
);

var splashHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    return SplashScreen();
  },
);

var chooseIdentityHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    return ChooseIdentityScreen();
  },
);
var inputPhoneHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, dynamic> params) {
    return InputPhoneScreen();
  },
);
var inputPasswordHandler = new Handler(
  handlerFunc: (context, params) {
    final args = context.settings.arguments as String;
    return InputPasswordScreen(args);
  },
);

var mainHandler = new Handler(
  handlerFunc: (context, params) {
    return MainScreen();
  },
);

var orderDetailHandler = new Handler(
  handlerFunc: (context, params) {
    String orderType = params['orderType']?.first;
    String orderId = params['orderId']?.first;
    String auntid = params['auntid']?.first;
    return OrderDetailScreen(orderId: orderId,orderType: orderType,auntid: auntid,);
  },
);